


<%@page import="com.ecable.util.UtilConstants"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%
	if (session.getAttribute("user") == null) {

		RequestDispatcher rd = request
				.getRequestDispatcher("./LoginForm.jsp");
		rd.forward(request, response);
%>
<%
	}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

	<head>




	</head>

	<body">
		<%
			String ltype = (String) session.getAttribute("role");
			try {
		%>




		<jsp:include page="Header.jsp"></jsp:include>
		<br />
		<table align="center" border="1" bgcolor="" width="60%"
			cellpadding="10">
			<caption>
				STATES INFORMATION
			</caption>
			<%
				if (ltype.equalsIgnoreCase("admin")) {
			%>
			<tr bgcolor="ashblue">
				<i>State Information </i>
			</tr>
			<tr>
				<th bgcolor="#FFFACD">
					<b>State Id</b>
				</th>
				<th bgcolor="#FFFACD">
					<b>State Name</b>
				</th>
				<th bgcolor="#FFFACD">
					<b>More Actions</b>
				</th>
			</tr>
			<c:if test="${not empty StateVector}">
				<c:forEach var="state" items="${StateVector}">
					<tr>

						<td>
							<a href="./StateUpdation?sid=${state.stateid }">${state.stateid
								}</a>
						</td>
						<td>
							${state.sname }
						</td>
						<td>
							<a href="./CancelStateAction?sid=${state.stateid }">Cancel</a>
						</td>
					</tr>
				</c:forEach>
			</c:if>

		</table>
		<br />
		<br />

		<center>
			<a href="./AddState.jsp">Add New State </a>
		</center>
		<br />
		<br />
		<br />


		Note:Click On StateID to Update

		<br />
		<br />
		<%
			} else if (ltype.equalsIgnoreCase("manager")) {
		%>

		<table align="center" border="1" bgcolor="" width="60%"
			cellpadding="10">
			<tr bgcolor="ashblue">
				<i>State Information </i>
			</tr>
			<br />
			<br />
			<tr>
				<th>
					<b>State Id</b>
				</th>
				<th>
					<b>State Name</b>
				</th>
			</tr>
			<c:if test="${not empty StateVector}">
				<c:forEach var="state" items="${StateVector}">
					<tr>
						<td>
							${state.stateid }
						</td>
						<td>
							${state.sname }
						</td>
					</tr>
				</c:forEach>
			</c:if>
		</table>
		<%
			}
			} catch (Exception e) {
				e.printStackTrace();
		%>
		<%
			}
		%>
		<br />
		<br />

	</body>

	<br />
	<jsp:include page="./Footer.jsp"></jsp:include>

</html>
